#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
    int hour, minute, k, n = 0;
    scanf("%d:%d", &hour, &minute);
    scanf("%d", &k);
    if (k % 60 != 0)
    {
        hour += k / 60, minute += k % 60;
        if (minute >= 60)
        {
            hour += minute / 60, minute = minute % 60;
        }
    }
    else {
        hour += k / 60;
    }
    if (hour > 24)
        hour = 0 + hour % 24;
    else if (hour == 24)
        hour = 0;
    if (hour < 10 && minute < 10)
        printf("0%d:0%d", hour, minute);
    else if (hour < 10)
        printf("0%d:%d", hour, minute);
    else if (minute < 10)
        printf("%d:0%d", hour, minute);
    else
        printf("%d:%d", hour, minute);
    return 0;
}